﻿namespace QPEngine
{
	public class SessionPlayerComponent : Component
	{
		public Player Player;

		public override void Dispose()
		{
			if (this.Id == 0)
			{
				return;
			}

			base.Dispose();
            Log.Error($"{this.Player.Info.Account} seesionPlayerCompnent.Dispose()");
			Game.Scene.GetComponent<PlayerComponent>()?.Remove(this.Player.Info.Account);
            ObjectEvents.Instance.PeopleDisconnect(this.Player);
		}
	}
}